package com.zhouzhou.fastjava.query;

public class QueryField {

    private String name;

    private QueryFieldType type = QueryFieldType.STRING_LIKE;

    private boolean array = false;

    public QueryField() {
    }

    public QueryField(String name) {
        this.name = name;
    }

    public QueryField(QueryFieldType type, boolean array) {
        this.type = type;
        this.array = array;
    }

    public QueryField ofNew(String name) {
        QueryField queryField = new QueryField();
        queryField.setName(name);
        queryField.setType(getType());
        queryField.setArray(isArray());
        return queryField;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public QueryFieldType getType() {
        return type;
    }

    public void setType(QueryFieldType type) {
        this.type = type;
    }

    public boolean isArray() {
        return array;
    }

    public void setArray(boolean array) {
        this.array = array;
    }

}
